package com.cs.peanut.base_app;

import android.content.Context;
import android.media.AudioManager;
import android.os.Build;

/**
 * Created by zack on 2018/3/15.
 */

public class MediaManager {
    private static MediaManager _instance;
    public final Device device;

    private MediaManager() {
        device = new Device();
        device.setAppVersion(BuildConfig.VERSION_NAME);
        device.setDeviceName(Build.BRAND + "-" + Build.MODEL/* + Build.MANUFACTURER*/);
        device.setDeviceVersion("Version_1.0");
        AudioManager am = (AudioManager) BaseApp.getApplication().getSystemService(Context
                .AUDIO_SERVICE);
        device.setVoice(am.getStreamVolume(AudioManager.STREAM_VOICE_CALL));
        device.setBright(1.0f);
    }

    public static MediaManager getInstance() {
        if (_instance == null) {
            _instance = new MediaManager();
        }
        return _instance;
    }

}
